package com.kingsoft.demo.rmi;
import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

/**
 * 服务端
 * @author kbl
 *
 */
public class HelloServer {
	
	public static void main(String[] args) {
		
		try{
			LocateRegistry.createRegistry(1099);
			
			HelloInterface hello = new Hello("Hello, world!");
			
			 Naming.rebind("rmi://192.168.1.185:1099/Hello", hello);    
			 System.out.println("Hello Server is ready.");    
			
		}catch (Exception e) {
			e.printStackTrace();
		}
		
		
	}

}
